/*
 * main.cpp
 *
 *  Created on: May 8, 2013
 *      Author: r.leonov
 */


#include "kl_lib_l15x.h"
#include "led_indicate.h"
#include "pn_hl.h"
#include "main.h"
#include "stm32l1xx_spi.h"

void GeneralInit(void);

int main(void){

	GeneralInit();

	while(1){
    	Led.Task();
    	Uart.Task();
    	Pn.Task();
    }
}

void GeneralInit(void){
	SystemCoreClockUpdate();
	// Init Delay
	Delay.Init();
	// Led Init
	Led.Init();
	// Uart Init
	Uart.Init(57600);
	Uart.Printf("\rReaderGenII v.%u\r", CURRENT_FW_VER);
	// Pn Init
	Pn.Init();
}
